home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000191_icon-group-sender _Mon Aug 19 15:42:30 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 20 Aug 1996 08:07:48 MST
  2. Date: Mon, 19 Aug 1996 15:42:30 -0700 (MST)
  3. Message-Id: <199608192242.PAA06268@primenet.com>
  4. X-Sender: whm@mailhost.primenet.com
  5. X-Mailer: Windows Eudora Pro Version 2.1.2
  6. Mime-Version: 1.0
  7. Content-Type: text/plain; charset="us-ascii"
  8. To: Chris Fraser <cwfraser@microsoft.com>
  9. From: "William H. Mitchell" <whm@mse.com>
  10. Subject: Re: evaluating 
  11. Cc: icon-group@cs.arizona.edu
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13.  
  14. At 10:15 AM 8/19/96 -0700, Chris Fraser wrote:
  15. >During the evaluation of, say,
  16. >
  17. >    every (1 to 1000000)/real(n) ...
  18. >
  19. >n is converted to floating point once, not one million times, right?
  20. >
  21.  
  22. I'd say a million.
  23.  
  24. Consider this program:
  25.  
  26.         procedure main()
  27.            every (1 to 10)/f()
  28.         end
  29.         procedure f()
  30.             return 1
  31.         end
  32.  
  33. Here's the *icont* output with tracing:
  34.  
  35.              :      main()
  36. x.icn        :    2  | f()
  37. x.icn        :    5  | f returned 1
  38. x.icn        :    2  | f()
  39. x.icn        :    5  | f returned 1
  40. x.icn        :    2  | f()
  41. x.icn        :    5  | f returned 1
  42. x.icn        :    2  | f()
  43. x.icn        :    5  | f returned 1
  44. x.icn        :    2  | f()
  45. x.icn        :    5  | f returned 1
  46. x.icn        :    2  | f()
  47. x.icn        :    5  | f returned 1
  48. x.icn        :    2  | f()
  49. x.icn        :    5  | f returned 1
  50. x.icn        :    2  | f()
  51. x.icn        :    5  | f returned 1
  52. x.icn        :    2  | f()
  53. x.icn        :    5  | f returned 1
  54. x.icn        :    2  | f()
  55. x.icn        :    5  | f returned 1
  56. x.icn        :    3  main failed
  57.  
  58. The compiler might do better...
  59.  
  60.